<?php

namespace App\Providers;

use App\Core\Database\Cacher;
use Illuminate\Support\ServiceProvider;

class ModelCacheProvider extends ServiceProvider
{
    /**
     * Register services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

    /**
     * Bootstrap services.
     *
     * @return void
     */
    public function boot()
    {
        if(! class_exists('Redis')) {
            Cacher::disable();
        }
    }
}
